namespace Digitalmes.Domain.Entities.Mes.Traceability;

/// <summary>
/// 警报记录
/// </summary>
[SugarTable("trace_alarm_record")]
public sealed class TraceAlarmRecord : EntityBase
{
    /// <summary>
    /// 报警的产线 Id
    /// </summary>
    public int LineId { get; set; }

    /// <summary>
    /// 报警的产线代码
    /// </summary>
    public string? LineCode { get; set; }

    /// <summary>
    /// 报警的区域
    /// </summary>
    public string? Area { get; set; }

    /// <summary>
    /// 报警的工位 Id
    /// </summary>
    public string? WsId { get; set; }

    /// <summary>
    /// 报警的工位代码
    /// </summary>
    public string? WsCode { get; set; }

    /// <summary>
    /// 对应的数据索引
    /// </summary>
    public int Index { get; set; }

    /// <summary>
    /// 警报内容
    /// </summary>
    [NotNull]
    public string? Content { get; set; }

    /// <summary>
    /// 警报等级
    /// </summary>
    public int Level { get; set; }

    /// <summary>
    /// 警报开始时间
    /// </summary>
    public DateTime StartTime { get; set; }

    /// <summary>
    /// 警报结束时间
    /// </summary>
    public DateTime? EndTime { get; set; }
}
